package com.zichong.wiki.req;

import javax.validation.constraints.Max;
import javax.validation.constraints.NotNull;

public class PageReq {
    @NotNull(message = "Page can not be null.")
    private int page;

    @NotNull(message = "Size can not be null.") // size 不能为空
    @Max(value = 100, message = "Size can not exceed 100.")  // 每页条数(size)不能超过 100
    private int size;

    public int getPage() {
        return page;
    }

    public void setPage(int page) {
        this.page = page;
    }

    public int getSize() {
        return size;
    }

    public void setSize(int size) {
        this.size = size;
    }

    @Override
    public String toString() {
        return "PageReq{" +
                "page=" + page +
                ", size=" + size +
                '}';
    }
}